<script lang="ts" setup>
import { ref } from 'vue';

const foods = ref(['烤肉', '小炒肉', '饺子', '拌面'])
const list = ref([
  { id: 1, name: '《红楼梦》', author: '曹雪芹' },
  { id: 2, name: '《西游记》', author: '吴承恩' },
  { id: 3, name: '《水浒传》', author: '施耐庵' },
  { id: 4, name: '《三国演义》', author: '罗贯中' }
])
</script>

<template>
  <p v-for="(item,index) in foods" :key = "index">{{ index +1}}{{ item }}</p>

  <ol>
    <li v-for="item in 10" :key="item">测试列表</li>
  </ol>

  <ul>
    <li v-for="value in list" :key="value.id">{{ value }}</li>
  </ul>
</template>